<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录</title>
<link rel="stylesheet" type="text/css" href="static/css/index.css">
</head>
<script src="static/js/jquery-3.3.1.min.js"></script>
<script src="static/js/index.js"></script>
<script type="text/javascript">
function login() {
	var username = getUserName();
	var password = getPassword();

	$.ajax({
		type : 'POST',
		url : '/network_monitoring_system/net/user/login',
		data : {
			user_name : username,
			user_pass : password
		},
		success : function(data) {
			if (data.code == 0) {
				alert(data.message);
			} else {
				alert(data.message);
			}

		},
		dataType : "json"
	});
};
</script>

<body>

<a href="getColumnChart.do">图表</a>
	<div class="wrapper">

		<div class="container">
			<h1>Welcome</h1>
			<form class="form" name="form">
				<input id="username" type="text" placeholder="用户名"> <input
					id="password" type="password" placeholder="密码">
				<button id="login-button" onclick="login()">登录</button>
			</form>
		</div>

		<ul class="bg-bubbles">
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
		</ul>

	</div>


</body>
</html>